package Tween
{
	import Plugin.TweenObjectPlugin;
	import Plugin.TweenPlugin;
	
	import flash.geom.Point;

	public class RotationTween extends TweenObjectPlugin
	{
		public var lockTo:Point;
		public var startRotation:Number=0;
		public var endRotation:Number=0;
		public function RotationTween()
		{
			super();
		}
		override protected function _update():void
		{
			if(time==0)return;
			
			var rotation:Number = 0;
			rotation = easeing(time,startRotation,endRotation-startRotation,duration);
			go.obj.rotation = rotation;
			if(lockTo)
			{
				go.moveTo(lockTo.x,lockTo.y,handleX,handleY);
			}
		}
	}
}